package command;

/**
 * @Author: linKe
 * @Date: 2022/1/14 23:15
 * @FileName: Tv
 * @version: 1.0
 * @Description: 电视对象
 */
public class TV {
    private String name;

    public TV(String name) {
        this.name = name;
    }

    public void on() {
        System.out.println(name + "被打开了");
    }

    public void off() {
        System.out.println(name + "被关闭了");
    }

    public String getName() {
        return name;
    }
}
